﻿#ifndef TCPCODEC_HEARTBEAT_H
#define TCPCODEC_HEARTBEAT_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include "TcpCodecBase.h"

#include "LogSaver.h"

class RegisterCenter_User;
class TcpCodec_HeartBeat : public QObject,public ObjAutoInject,public TcpCodecBase
{
  Q_OBJECT
private://dependency
  RegisterCenter_User* registerCenter_User=Q_NULLPTR;
  LogSaver* logSaver=LogSaver::getLogSaver();
public:
  explicit TcpCodec_HeartBeat();
  virtual ~TcpCodec_HeartBeat();
public:
  virtual DataPackage_TcpCodec* decode(DataPackage_TcpCodec* dataPackageInfo_User)override;
public://geter and seter
  RegisterCenter_User* getRegisterCenter_User()const;
  TcpCodec_HeartBeat* setRegisterCenter_User(RegisterCenter_User*const registerCenter_User);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap)override;
};

#endif // TCPCODEC_HEARTBEAT_H
